#pragma once
#include "../Ode.h"


/* standard joint parameter names. why are these here? - because we don't want
* to include all the joint function definitions in joint.cpp. hmmmm.
* MSVC complains if we call D_ALL_PARAM_NAMES_X with a blank second argument,
* which is why we have the D_ALL_PARAM_NAMES macro as well. please copy and
* paste between these two.
*/

#define ALL_PARAM_NAMES() \
	/* parameters for limits and motors */ \
	LoStop = dParamLoStop, \
	HiStop = dParamHiStop, \
	Velocity = dParamVel, \
	FMax = dParamFMax, \
	FudgeFactor = dParamFudgeFactor, \
	Bounce = dParamBounce, \
	CFM = dParamCFM, \
	StopERP = dParamStopERP, \
	StopCFM = dParamStopCFM, \
	/* parameters for suspension */ \
	SuspensionERP = dParamSuspensionERP, \
	SuspensionCFM = dParamSuspensionCFM, \
	ERP = dParamERP, \

//////////////////////////////////////////////////////////////////////////////
/// \enum  D_ALL_PARAM_NAMES_X
///
/// \var dParamGroup This is the starting value of the different group
///                  (i.e. dParamGroup1, dParamGroup2, dParamGroup3)
///                  It also helps in the use of parameter
///                  (dParamGroup2 | dParamFMax) == dParamFMax2
//////////////////////////////////////////////////////////////////////////////
#define ALL_PARAM_NAMES_X(x) \
	Group ## x = dParamGroup ## x, \
	/* parameters for limits and motors */ \
	LoStop ## x = dParamLoStop ## x , \
	HiStop ## x = dParamHiStop ## x, \
	Velocity ## x = dParamVel ## x, \
	FMax ## x = dParamFMax ## x, \
	FudgeFactor ## x = dParamFudgeFactor ## x, \
	Bounce ## x = dParamBounce ## x, \
	CFM ## x = dParamCFM ## x, \
	StopERP ## x = dParamStopERP ## x, \
	StopCFM ## x = dParamStopCFM ## x, \
	/* parameters for suspension */ \
	SuspensionERP ## x = dParamSuspensionERP ## x, \
	SuspensionCFM ## x = dParamSuspensionCFM ## x, \
	ERP ## x = dParamERP ## x,

namespace Skill
{
	namespace Ode
	{
		namespace Joints
		{
			public enum class DJointParameters
			{
				ALL_PARAM_NAMES()
				InGroup = dParamsInGroup,     ///< Number of parameter in a group
				ALL_PARAM_NAMES_X(1)
				ALL_PARAM_NAMES_X(2)
				ALL_PARAM_NAMES_X(3)

				///<summary>
				/// add a multiple of this constant to the basic parameter numbers to get
				/// the parameters for the second, third etc axes.
				///</summary>
				Group = dParamGroup
			};		
		}
	}
}